/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.imenu.terminal;

import java.io.*;
import java.net.*;

public class Client {

    Socket socket;
    BufferedReader in;
    PrintWriter out;
    static Socket server;

    public static void main(String[] args) throws Exception {
        server = new Socket(InetAddress.getLocalHost(), 7000);
        System.out.println("Client.main() 0");
        BufferedReader in = new BufferedReader(new InputStreamReader(server.getInputStream()));
        PrintWriter out = new PrintWriter(server.getOutputStream());
        out.print("01224655");
        out.flush();
        System.out.println("Client.main() 1");
        while (true) {
            System.out.println("Client.main() 2");
            String inStr = in.readLine();
            if (inStr.equals("end")) {
                break;
            }
            System.out.println("Client.main() 3");
            System.out.println(inStr);
        }
        server.close();
    }
}
